class Solution(object):
    def buildArray(self, target, n):
        out = []
        index = 1
        for num in target:
            while index < num:
                out.append('Push')
                out.append('Pop')
                index += 1
            out.append('Push')
            index += 1
        return out
data = Solution()
target = [1,3]
n = 3
print(data.buildArray(target, n))